package com.designpatterns.creational.factorymethod;

import com.designpatterns.utils.XMLUtil;

/**
 * 客户端测试类
 */
public class Client {
    public static void main(String[] args) {
//        LoggerFactory factory = new FileLoggerFactory();
//        Logger logger = factory.createLogger();
//        logger.writelog();
//        LoggerFactory factory = (LoggerFactory) XMLUtil.getBean();
//        Logger logger = factory.createLogger();
//        logger.writelog();
        LoggerFactoryClass factoryClass = (LoggerFactoryClass) XMLUtil.getBean("D:\\Project\\designparttern\\src\\main\\java\\com\\designpatterns\\creational\\factorymethod\\config.xml");
        factoryClass.writelog();
    }
}
